<template>
  <div class="nav-card" @click="$emit('click')">
    <div class="card-icon">
      <i :class="`icon-${icon}`"></i>
      <!-- 需要搭配图标库使用 -->
    </div>
    <h3>{{ title }}</h3>
  </div>
</template>

<script setup>
  defineProps({
    title: String,
    icon: String,
  });
</script>

<style scoped>
  .nav-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: transform 0.3s ease;
    text-align: center;
  }

  .nav-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
  }

  .card-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
  }

  h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #3f69cf;
  }
</style>
